package o;

import android.content.Context;
import android.os.Build.VERSION;
import com.huawei.appgallery.packagemanager.api.bean.ManagerTask;

public class cpl {
    private Context ˋ;
    private ManagerTask ॱ;

    public cpl(Context context, ManagerTask managerTask) {
        this.ˋ = context;
        this.ॱ = managerTask;
    }

    public void ˏ(String str, int i) {
        cnu.ˏ.ˋ("PackageInstallObserver", " installPkg:" + this.ॱ.packageName + " package install callback:packageName:" + str + ",returnCode:" + i + "|InstallExecption");
        cpp.ˏ(this.ˋ, this.ॱ.packageName, i, this.ॱ.taskId, 5, false);
    }

    public void ॱ(String str, int i) {
        int i2 = i;
        cpp.ˏ(this.ˋ, this.ॱ.packageName, i2, this.ॱ.taskId, 0, ˋ(str, i));
    }

    private boolean ˋ(String str, int i) {
        boolean z = false;
        if (VERSION.SDK_INT < 24 && -3 == i && cod.INSTALL == this.ॱ.processType && this.ॱ.mode == 1 && !this.ॱ.ˏ) {
            z = true;
        }
        cnu.ˏ.ˋ("PackageInstallObserver", " installPkg:" + this.ॱ.packageName + " package install callback:packageName:" + str + ",returnCode:" + i + ",changePath:" + z);
        if (1 == i && cop.ˊ != null) {
            cop.ˊ.ˊ(str);
        }
        return z;
    }
}
